package com.sgb.kjwl.view.ui.adapter.enterprise;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.databinding.ItemMakeoverDetailQuestionBinding;
import com.sgb.kjwl.interfaces.RecyclerClick;
import com.sgb.kjwl.model.entity.enterprise.IpPickSelectEntity;
import com.sgb.kjwl.model.entity.enterprise.QuestionEnyiy;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class MakeOverDetailQuestionAdapter extends BaseRecycleAdapter<QuestionEnyiy> {

    RecyclerClick<QuestionEnyiy> mRecyclerClick;

    public void setmRecyclerClick(RecyclerClick<QuestionEnyiy> mRecyclerClick) {
        this.mRecyclerClick = mRecyclerClick;
    }

    public MakeOverDetailQuestionAdapter(Context context, List<QuestionEnyiy> datas) {
        super(context, R.layout.item_makeover_detail_question, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, QuestionEnyiy ipPickSelectEntity) {
        holder.setBinding(BR.question, ipPickSelectEntity);

        ItemMakeoverDetailQuestionBinding itemMakeoverDetailQuestionBinding = (ItemMakeoverDetailQuestionBinding) holder.getmBinding();
        itemMakeoverDetailQuestionBinding.tvItemMakeoverDetail.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mRecyclerClick.followClick(ipPickSelectEntity);
            }
        });
    }
}
